package com.lh.project.model.vo;

import com.lh.project.model.entity.User;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户视图
 *
 * @TableName user
 */
@Data
public class UserVO implements Serializable {
    /**
     * id
     */
    private Long id;

    /**
     * 用户昵称
     */
    private String nickName;

    /**
     * 用户头像
     */
    private String icon;


    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public UserVO(User user){
        this.id =user.getId();
        this.nickName=user.getNickName();
        this.icon = user.getIcon();
        this.createTime = user.getCreateTime();
        this.updateTime = user.getUpdateTime();
    }

    public UserVO() {

    }
}